﻿using System;
using System.Collections.Generic;
using System.Linq;
using FacialClub.Models.Entities;

namespace FacialClub.Models.Interfaces
{
    /// <summary>
    /// Refer Friend Interface
    /// </summary>
    public interface IReferFriendRepository
    {
        /// <summary>
        /// Get All Refer Friend
        /// </summary>
        /// <returns></returns>
        IQueryable<ReferFriend> GetAllReferFriend();

        /// <summary>
        /// Get Refer Friend By Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ReferFriend GetReferFriend(int id);

        /// <summary>
        /// Get Refer Friend By Name
        /// </summary>
        /// <param name="strQuery"></param>
        /// <returns></returns>
        IQueryable<ReferFriend> GetReferFriendByName(string strQuery);

        /// <summary>
        /// Get Refer Friend By Email
        /// </summary>
        /// <param name="strQuery"></param>
        /// <returns></returns>
        IQueryable<ReferFriend> GetReferFriendByEmail(string strQuery);

        /// <summary>
        /// Get Refer Friend By Status
        /// </summary>
        /// <param name="strQuery"></param>
        /// <returns></returns>
        IQueryable<ReferFriend> GetReferFriendByStatus(bool strQuery);

        /// <summary>
        /// Update Token By Email
        /// </summary>
        /// <param name="strQuery"></param>
        /// <returns></returns>
        void ReferFriendTokenUpdateByEmail(string strQuery);

        /// <summary>
        /// Add Refer Friend in the Database
        /// </summary>
        /// <param name="referFriend"></param>
        void Add(ReferFriend referFriend);

        /// <summary>
        /// Delete Refer Friend from the Database
        /// </summary>
        /// <param name="referFriend"></param>
        void Delete(ReferFriend referFriend);

        /// <summary>
        /// Update the data
        /// </summary>
        /// <param name="referFriend"></param>
        void Update(ReferFriend referFriend);

        /// <summary>
        /// Save record in the database
        /// </summary>
        void Save();

        /// <summary>
        /// Generate Token
        /// </summary>
        /// <param name="strLength"></param>
        /// <returns></returns>
        string GenerateToken(int strLength);

        /// <summary>
        /// Check whether the Customer is already subscribed or not
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        bool IsCustomerByEmail(string email);

        /// <summary>
        /// Check whether the Subscriber is already subscribed or not
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        bool IsSubscriberByEmail(string email);

        /// <summary>
        /// Get Referred Friend By Referee Email
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        List<String> GetReferredFriendByEmail(string email);

        /// <summary>
        /// Send Confirmation Email to the Referee
        /// </summary>
        /// <param name="refereeName"></param>
        /// <param name="refereeEmail"></param>
        void SendConfirmationEmail(string refereeName, string refereeEmail);

        /// <summary>
        /// Send Invitation Email to the Referred
        /// </summary>
        /// <param name="refereeName"></param>
        /// <param name="referredEmail"></param>
        void SendInvitationEmail(string refereeName, string referredEmail);
    }
}